2 Problema: 10359 - Tiling
3 Aceptado por el juez de la UVa
4 Este código muestra tanto I/O como BigInteger
6 Autor: Andrés Mejía-Posada
13 public static void main(String
[] args
) throws IOException
{
14 BigInteger dp
[] = new BigInteger
[301];
15 dp
[0] = BigInteger
.ONE
;
16 dp
[1] = BigInteger
.ONE
;
17 for (int i
=2; i
<=300; ++i
){
18 dp
[i
] = dp
[i
-1].add(dp
[i
-2].add(dp
[i
-2]));
20 BufferedReader reader
= new BufferedReader(new InputStreamReader(System
.in
));
21 String line
= reader
.readLine();
22 while (line
!= null && line
.length() > 0){
23 int N
= Integer
.valueOf(line
);
24 System
.out
.println(dp
[N
].toString());
25 line
= reader
.readLine();